package com.example.demo.NiuKe.v01;

import java.io.IOException;
import java.io.InputStream;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) throws IOException {
        int times=0;
        InputStream in=System.in;
        char c=(char) in.read();
        System.out.println(c);
        while(c!='\n'){
            if(c==' '){
                times=0;
            }else{
                times+=1;
            }
            c=(char) in.read();
        }
        System.out.println(times);
        }

}
